Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / core / common / src / commonMain / kotlin / org / meshtastic / core / common / di / ApplicationCoroutineScope.kt

Displaying Raw • Download

core/common/src/commonMain/kotlin/org/meshtastic/core/common/di/ApplicationCoroutineScope.kt bd2863243bab6eb213401d949839a2bc74dde7e2 (bd286324) Text, 1.73 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.common.di

Tff7b72import T7ee787kotlinx.coroutines.CoroutineScope
Tff7b72import T7ee787kotlinx.coroutines.SupervisorJob
Tff7b72import T7ee787org.koin.core.annotation.Single
Tff7b72import T7ee787org.meshtastic.core.common.util.ioDispatcher

T8b949e/**
* A process-wide [CoroutineScope] that outlives individual ViewModels and UI components.
*
* Use this scope for fire-and-forget cleanup work that must continue after a ViewModel's own scope has been cancelled
* (for example, deleting temporary files in `onCleared()`). Backed by a [SupervisorJob] so failures in one child do not
* cancel siblings, and by [ioDispatcher] so work runs off the main thread.
*
* Prefer scoping work to a more specific scope (like `viewModelScope`) whenever possible; this scope is an escape hatch
* and should be used sparingly.
*/
Tff7b72interface T56d364ApplicationCoroutineScope Tb4b4b4: Te6edf3CoroutineScope

Tf0883e@SingleTb4b4b4(Te6edf3binds Tff7b72= Tff7b72[Te6edf3ApplicationCoroutineScopeTff7b72::Te6edf3classTff7b72]Tb4b4b4)
Tff7b72internal Tff7b72class T56d364ApplicationCoroutineScopeImpl Tb4b4b4: Te6edf3ApplicationCoroutineScope Tb4b4b4{
Tff7b72override Tff7b72val Te6edf3coroutineContext Tff7b72= Te6edf3SupervisorJobTb4b4b4(Tb4b4b4) Tff7b72+ Te6edf3ioDispatcher
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s